<style>
	td {
		padding: 7px 1px;
	}
</style>
<? if($this->logged_in && $this->user_id == Session::user()->id) : ?>
	<div style="float:right;padding:10px;"><a href="edit_info.php">Edit</a></div>
<? endif; ?>
<? if(!$this->is_friend && !$this->has_request): ?>
	<div style="float:right;padding:10px;"><a href="add_friend.php?id=<?= $this->user_id ?>">Add as Friend</a></div>
<? endif; ?>
<div style="float:left;">
	<table>
		<tr>
			<td>Name</td>
			<td><?= $this->user->name ?></td>
		</tr>
		<tr>
			<td>Address</td>
			<td><?= $this->user->address ?></td>
		</tr>	
		<tr>
			<td>Hometown</td>
			<td><?= $this->user->hometown ?></td>
		</tr>
		<tr>
			<td>Current City</td>
			<td><?= $this->user->current_city ?></td>
		</tr>	
		<tr>
			<td>Gender</td>
			<td><?= $this->user->gender ?></td>
		</tr>	
		<tr>
			<td>Birthday</td>
			<td><?= $this->user->birthdate ?></td>
		</tr>	
		<tr>
			<td>About Me</td>
			<td><?= $this->user->about_me ?></td>
		</tr>
		<tr>
			<td>Status</td>
			<td><?= $this->user->relationship_status ?></td>
		</tr>	
		<tr>
			<td>Email</td>
			<td><?= $this->user->email_ad1 ?> <?= $this->user->email_ad2 ? ", " . $this->user->email_ad2 : "" ?></td>
		</tr>	
		<tr>
			<td>Phone</td>
			<td>
				<?= $this->user->phone_number1 ?> 
				<?= $this->user->phone_number2 ? ", " . $this->user->phone_number2 : "" ?>
			</td>
		</tr>	
		<tr>
			<td>Website</td>
			<td><?= $this->user->website ?></td>
		</tr>		
	</table>
</div>
<? if(Session::has_error()): ?>
	<div style="float:left;padding:10px;border-style:solid;border-color:red;border-width:2px;color:red">
		<?= Session::get_error_message(); ?>
	</div>
<? endif; ?>